<?php
/**
 * CreateTime: 2022/9/28 10:30
 */

namespace App\Http\Requests\NewContract;

use App\Http\Requests\BaseRequests;

class RecordContractPost  extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'record_department_id' => "required",
            'record_owner_id' => "required",
            "record_location" => "required",
            "record_contract_file" => "required"
        ];
    }

    public function messages()
    {
        return [
            'record_owner_id.required' => "归档人不能为空",
            'record_department_id.required' => "归档部门不能为空",
            'record_location.required' => "归档地点不能为空",
            'record_contract_file.required' => "合同原件不能为空",
        ];
    }
}